//
//  YMSDtailController.swift
//  YMSWeibo
//
//  Created by 杨茂盛 on 2016/11/24.
//  Copyright © 2016年 杨茂盛. All rights reserved.
//

import UIKit

class YMSDtailController: UIViewController {

    var myWebView = UIWebView()
    var urlString:String?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = #colorLiteral(red: 0.5843137503, green: 0.8235294223, blue: 0.4196078479, alpha: 1)

    }
    
    override func loadView() {
        self.view = myWebView
        loadWithUrl()
    }
    
    func loadWithUrl(){
        
        guard let urlStr = urlString else{
            
        return
            
        }
        let url = URL(string: urlStr)
        let requet = URLRequest(url: url!)
        self.myWebView.loadRequest(requet)
    }

}
